class UssersController < ApplicationController
  # GET /ussers
  # GET /ussers.json
  def index
    @ussers = Usser.all

    respond_to do |format|
      format.html # index.html.erb
      format.json { render json: @ussers }
    end
  end

  # GET /ussers/1
  # GET /ussers/1.json
  def show
    @usser = Usser.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.json { render json: @usser }
    end
  end

  # GET /ussers/new
  # GET /ussers/new.json
  def new
    @usser = Usser.new

    respond_to do |format|
      format.html # new.html.erb
      format.json { render json: @usser }
    end
  end

  # GET /ussers/1/edit
  def edit
    @usser = Usser.find(params[:id])
  end

  # POST /ussers
  # POST /ussers.json
  def create
    @usser = Usser.new(params[:usser])

    respond_to do |format|
      if @usser.save
        format.html { redirect_to @usser, notice: 'Usser was successfully created.' }
        format.json { render json: @usser, status: :created, location: @usser }
      else
        format.html { render action: "new" }
        format.json { render json: @usser.errors, status: :unprocessable_entity }
      end
    end
  end

  # PUT /ussers/1
  # PUT /ussers/1.json
  def update
    @usser = Usser.find(params[:id])

    respond_to do |format|
      if @usser.update_attributes(params[:usser])
        format.html { redirect_to @usser, notice: 'Usser was successfully updated.' }
        format.json { head :no_content }
      else
        format.html { render action: "edit" }
        format.json { render json: @usser.errors, status: :unprocessable_entity }
      end
    end
  end

  # DELETE /ussers/1
  # DELETE /ussers/1.json
  def destroy
    @usser = Usser.find(params[:id])
    @usser.destroy

    respond_to do |format|
      format.html { redirect_to ussers_url }
      format.json { head :no_content }
    end
  end
end
